﻿package plugin.fashen
{
    import com.core.*;

    public class FaShenControl extends Control
    {

        public function FaShenControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "fashen")
            {
                if (param2.property == "init")
                {
                    this.target.showJiHuoList(param2.newvalue);
                }
                else if (param2.property == "updateJinbi")
                {
                    this.target.showJinBi();
                }
                else if (param2.property == "updateSuiPian")
                {
                    this.target.showSuiPian();
                }
                else if (param2.property == "jihuoHero")
                {
                    this.target.jihuoHero(param2.newvalue);
                }
                else if (param2.property == "zhaohuan")
                {
                    this.target.showChuZhan(param2.newvalue, 1);
                }
                else if (param2.property == "shengji")
                {
                    this.target.showShengJi(param2.newvalue);
                    this.target.showFaShenList();
                    this.target.showJinBi();
                }
                else if (param2.property == "updatelevel")
                {
                    this.target.showHeroInfo();
                }
                else if (param2.property == "xiuxi")
                {
                    this.target.showChuZhan(param2.newvalue, 2);
                }
                else if (param2.property == "goumai")
                {
                    this.target.showChuZhan(param2.newvalue, 3);
                }
                else if (param2.newvalue == "showSuiPian")
                {
                    this.target.showSuiPian();
                }
                else if (param2.property == "autoChuZhan")
                {
                    this.target.autoChuZhan(param2.newvalue);
                }
                else if (param2.property == "fashenzhi")
                {
                    this.target.showFSZ(param2.newvalue);
                }
                else if (param2.property == "updateRein")
                {
                    this.target.updateRein();
                    this.target.showFaShenList();
                }
                else if (param2.property == "updateMapID")
                {
                    this.target.updateMapID();
                }
                else if (param2.property == "showBindBuffer")
                {
                    this.target.showRightShuXing();
                }
            }
            return;
        }// end function

    }
}
